import numpy as np
import scipy
from matplotlib import pylab

x = 100*scipy.randn(10000)
x.sort()
n = len(x)
x2 = np.repeat(x, 2)
y2 = np.hstack([0.0, np.repeat(np.arange(1,n) / float(n), 2), 1.0])
pylab.plot(x2, y2)
pylab.show()
